<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page session="false"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>TOP PITCH - My Pitches</title>
<link href="resources/css/common.css" rel="stylesheet" type="text/css" />
<link href="resources/css/left_nav.css" rel="stylesheet" type="text/css" />
<link href="resources/css/student/my_pitches.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="resources/jss/jquery-1.7.2.min.js" ></script>
<script type="text/javascript" src="resources/jss/student/mypitches.js" ></script>
</head>
<body>
	<div class="main">
		<jsp:include page="../header.inc.jsp"></jsp:include>
		<table>
			<tr>
				<jsp:include page="leftNav.inc.jsp"></jsp:include>
				<td class="rightcontent">
					<div>
						<div>
							<table>
								<c:forEach var="pitch" items="${ pitches }">
								<tr>
									<td class="overview">
										<div>
											<a href="pitch?pitchId=${ pitch.pitchId }"><span class="title"><c:out value="${ pitch.companyName }" /></span>(<c:out value="${ pitch.companyTicker }" />)-<c:out value="${ pitch.recommendation }" /></a><br />
											<span class="date">Posted on <c:out value="${ pitch.date }" /> by <a href="profile?email=${ pitch.authorEmail }"><c:out value="${ pitch.authorFullName }" /></a></span><br />
										</div>
									</td>
									<td class="comments">
										<div>
											<c:out value="${ pitch.commentCount }" />
										</div>
									</td>
									<td class="deletepitch">
										<c:choose>
											<c:when test="${ needPaging }">
											<a href="#" onClick="javascript: deletePitch('${ pitch.pitchId }', ${ previousIndex })"><img alt="" src="resources/images/delete.png" /></a>
											</c:when>
											<c:otherwise>
											<a href="#" onClick="javascript: deletePitch('${ pitch.pitchId }', -1)"><img alt="" src="resources/images/delete.png" /></a>
											</c:otherwise>
										</c:choose>
									</td>
								</tr>
								</c:forEach>
							</table>
						</div>
						<c:if test="${ needPaging }">
						<div class="paging">
							<c:if test="${ needPrevious }">
							<a href="studentMyPitches?page=${ previousIndex }">Previous</a>
							&nbsp;
							</c:if>
							<c:forEach var="paging" items="${ pagings }">
								<a href="studentMyPitches?page=${ paging.index }">${ paging.index }</a>
								&nbsp;
							</c:forEach>
							<c:if test="${ needNext }">
							<a href="studentMyPitches?page=${ nextIndex }">Next</a>
							</c:if>
						</div>
						</c:if>
					</div>
				</td>
			</tr>
		</table>
		<jsp:include page="../footer.inc.jsp"></jsp:include>
	</div>
		<jsp:include page="../copyright.inc.jsp"></jsp:include>
</body>
</html>
